﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Things.Common
{
    public class ConfigureValue
    {
        /// <summary>
        /// 零售，免运费的条件
        /// </summary>
        public static decimal DanGouMianYunFei 
        {
            get
            {
                decimal mianYunFei = 0;
                if (decimal.TryParse(ConfigurationManager.AppSettings["DanGouMianYunFei"], out mianYunFei) == false)
                {
                    mianYunFei=99;
                }
                return mianYunFei;
            }
        }

        /// <summary>
        /// 订购，免运费的条件
        /// </summary>
        public static decimal DingGouMianYunFei
        {
            get
            {
                decimal mianYunFei = 0;
                if (decimal.TryParse(ConfigurationManager.AppSettings["DingGouMianYunFei"], out mianYunFei) == false)
                {
                    mianYunFei = 399;
                }
                return mianYunFei;
            }
        }

        /// <summary>
        /// 运费/公斤
        /// </summary>
        public static decimal YunFei
        {
            get
            {
                decimal mianYunFei = 0;
                if (decimal.TryParse(ConfigurationManager.AppSettings["YunFei"], out mianYunFei) == false)
                {
                    mianYunFei = 9;
                }
                return mianYunFei;
            }
        }

        /// <summary>
        /// 快递Key
        /// </summary>
        public static string KuaiDiKey
        {
            get
            {
                return ConfigurationManager.AppSettings["KuaiDiKey"].ToString();
            }
        }
    }

    public class ConstantString
    {
        public const string Seperate = " | ";
        public const string Images = "CustomImages";

        public const string ClassCropsPlantProgressInfo = "CropsPlantProgressInfo";
        public const string ClassCropsProductProgressInfo = "CropsProductProgressInfo";
        public const string ClassBuyerAccount = "BuyerAccount";
        public const string ClassGoodsList = "ClassGoodsList";
        public const string ClassMainComments = "ClassMainComments";
        public const string ClassGoods = "ClassGoods";
        public const string ClassOrderPlan = "ClassOrderPlan";

        public const string HomePageURL = "~/default.aspx";
        public const string LoginPageURL = "~/login.aspx";
        public const string GoodsOrderPageURL = "~/GoodsOrders/GoodsOrder.aspx";

        public const string SessionSourceURL = "SourceURL";
        public const string SessionCurrentBuyerAccount = "CurrentBuyerAccount";
        public const string SessionPassErrorCountAdmin = "PassErrorCountAdmin";
        public const string SessionCheckCode = "CheckCode";
        public const string SessionImages = "Images";
        public const string SessionGoodsCart = "GoodsCart";
        public const string SessionPayForm = "SessionPayForm";

        public const string CookieGoodsCart = "CookieGoodsCart";
      

        public  enum GoodsPriceType
        {
            零售=0,
            团购=1,
            订购=2
        }

        public  enum GoodsOrderSatus
        {
            未付款 = 0,
            已付款 = 1,
            已发货 = 2,
            已签收 = 3,
            申请退货 = 4,
            已取消=5,
            交易成功=6,
            交易关闭=7,
            申请换货=8
        }

        public enum GoodsCategoryName
        {
            大米=0,
            杂粮=1
        }
    }
}
